![]() |
FindWindow |
||||
Header: | MacWindows.h | Carbon status: | Supported | |
Maps the location of the cursor to a part of the screen or a region of a window when your application receives a mouse-down event.
WindowPartCode FindWindow ( Point thePoint, WindowRef *window );
The point, in global coordinates, where the mouse-down event occurred. Your application retrieves this information from the where field of the event structure.
A pointer to the window in which the mouse-down event occurred. FindWindow produces nil if the mouse-down event occurred outside a window.
The location of the cursor when the user pressed the mouse button; see
You typically call the function FindWindow whenever you receive a mouse-down event. The FindWindow function helps you dispatch the event by reporting whether the cursor was in the menu bar or in a window when the mouse button was pressed. If the cursor was in a window, the function will produce both a pointer to the window and a constant that identifies the region of the window in which the event occurred. If Appearance is available, FindWindow may return the inCollapseBox constant as one of the possible window regions.
This function was changed with Appearance Manager 1.0 to support finding events in the collapse box.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)